511348989 by Unknown

511348989 by Unknown

Author:Unknown
Language: eng
Format: epub


insertRow(<position x>)

adds a row at the x+1 row of the model.

Go ahead and run To insert a new record, click the appropriate button. A new row will be added after the last row of the table. Double click on this row to edit it and press the Enter key on your keyboard after you’ve finished. To delete a row, first highlight it with your mouse and click on the delete button.

Figure 7.2 QsqlTableModel demo

QsqlRelationalTableModel

All our work with databases so far has involved working with a single table. But the real power of databases comes from aggregating various tables together and presenting an interface to manipulate these components as one.

The QSqlRelationalTableModel class inherits all its methods from the QSqlTableMode1 class and, in addition to them, defines the following methods that you may find useful:

setRelation(column index>, Lets the specified column be a foreign index specified by

setJoinMode(Specifies the binding mode for the entire model. We pass an enumerated type here. Its possible values and their meanings are shown below:

below:

below: below: below: below: below: below: below: below: below: below: below: below: below: below: below:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.